Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix USDC user bank creation #10445

Merged
merged 6 commits into from
Nov 15, 2024
Merged

Conversation

rickyrombo
Copy link
Contributor

@rickyrombo rickyrombo commented Nov 14, 2024

  • Updates getOrCreateUSDCUserBank to use SDK
    • Prior, this was using libs and thus identity's relay, which doesn't have the same config for the RPCs and doesn't have the latest retry logic etc.
    • SDK's ClaimableTokensClient is a singleton, and its getOrCreateUserBank should be concurrency safe already, so no need for saga channels.
  • Fixes an extraneous bug I found along the way where we were sending the mint name as the transaction commitment
  • Fixes the SDK to use the default priority fee and add a compute budget limit when calling getOrCreateUserBank in the ClaimableTokensClient

Another bug I found is the funding of Solana relayers script is failing due to outdated @solana/web3.js. It was missed in the audit because its source is not on GitHub. I've funded the wallets and will publish a new repo for this script as well.

Copy link

changeset-bot bot commented Nov 14, 2024

🦋 Changeset detected

Latest commit: cc6198e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@audius/sdk Patch
@audius/sdk-legacy Patch
@audius/sp-actions Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

@schottra schottra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

packages/common/src/store/buy-usdc/utils.ts Outdated Show resolved Hide resolved
@audius-infra
Copy link
Collaborator

@audius-infra
Copy link
Collaborator

@pull-request-size pull-request-size bot added size/L and removed size/M labels Nov 15, 2024
@rickyrombo rickyrombo changed the title Make getOrCreateUSDCUserBank use SDK and thus DN1 solana relay Fix USDC user bank creation Nov 15, 2024
@audius-infra
Copy link
Collaborator

const confirmationStrategyArgs =
const computeBudgetLimitInstruction =
ComputeBudgetProgram.setComputeUnitLimit({
units: 50000
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What criteria determines this value? And I thought we used constants that were settable by remote config for things like this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked at what the simulation estimated the compute limit to be, and then doubled it. It's a bit of a magic number, can probably revisit later. Want to get this in though because the smaller we can make this number (it defaults to 200k) the more likely validators will let us in their block.

@rickyrombo rickyrombo merged commit 998e1f7 into main Nov 15, 2024
3 of 5 checks passed
@rickyrombo rickyrombo deleted the mjp-sdk-get-or-create-usdc-userbank branch November 15, 2024 05:04
rickyrombo added a commit that referenced this pull request Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants